﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	x:Class="WPBlogMenu.Toast"
	d:DesignWidth="280" d:DesignHeight="35">
    <UserControl.Resources>
        <Storyboard x:Name="Flip" RepeatBehavior="3x">
            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationX)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.CenterOfRotationY)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="grid">
                <EasingDoubleKeyFrame KeyTime="0" Value="90"/>
                <EasingDoubleKeyFrame KeyTime="0:0:10" Value="90"/>
                <EasingDoubleKeyFrame KeyTime="0:0:10.3" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:20" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:20.3" Value="90"/>
                <EasingDoubleKeyFrame KeyTime="0:1:0" Value="90"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Height="35" Width="280" Loaded="LayoutRoot_Loaded">
        <Grid x:Name="grid" Background="{Binding TileColor}" >
            <Grid.Projection>
                <PlaneProjection/>
            </Grid.Projection>
            
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" d:LayoutOverrides="Height">
            <Grid Visibility="{Binding TipIconVisiblility}" Width="40" Margin="-5,0" RenderTransformOrigin="0.5,0.5" >
            	<Grid.RenderTransform>
            		<CompositeTransform ScaleX="0.6" ScaleY="0.6"/>
            	</Grid.RenderTransform>
                <Path Data="M20.083334,3.5833333 C7.7008057,3.6700039 8.1222963,17.707199 15.299674,21.280367 L15.333811,25.68733 L15.333879,29.249748 L16.719402,29.937233 L17.083878,32.333012 L23.250113,32.416676 L23.66675,29.916399 L24.84503,29.343496 L24.842417,21.19404 C31.78801,17.882492 32.440655,3.4973531 20.083334,3.5833333 z" HorizontalAlignment="Left" Margin="10.334,3.583,0,2.583" Stretch="Fill" UseLayoutRounding="False" Width="19.411" Stroke="White"/>
                <Path Data="M16.718756,28.503433 L23.68717,28.502935 L23.280451,32.395107 L17.093472,32.364212 z" Fill="White" HorizontalAlignment="Left" Height="3.323" Margin="16.719,0,0,2.594" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Bottom" Width="6.969" Stroke="White"/>
                <Path Data="M15.065035,25.793587 L24.744005,25.7994" Fill="#33F4F4F5" HorizontalAlignment="Left" Height="1.062" Margin="15.095,0,0,7.134" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Bottom" Width="9.656" Stroke="White"/>
                <Path Data="M14.960629,22.082062 L24.840345,22.083868" Fill="#33F4F4F5" HorizontalAlignment="Left" Height="1.058" Margin="15.002,0,0,9.333" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Bottom" Width="9.831" Stroke="White"/>
                <Path Data="M5.75,3.25 L10.25,5.875" Fill="#33F4F4F5" HorizontalAlignment="Left" Height="4.625" Margin="4.75,2.25,0,0" Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" VerticalAlignment="Top" Width="6.5"/>
                <Path Data="M5.25,11.25 L9.375,10.875" Fill="#33F4F4F5" HorizontalAlignment="Left" Height="2.375" Margin="3.336,9.875,0,0" Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" VerticalAlignment="Top" Width="6.125"/>
                <Path Data="M10.25,16.375 L6.75,18.25" Fill="#33F4F4F5" HorizontalAlignment="Left" Margin="4.75,15.707,0,15.418" Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" Width="5.5"/>
                <Path Data="M29.625,5.375 L33.125,2.875" Fill="#33F4F4F5" HorizontalAlignment="Left" Height="4.5" Margin="28.625,1.875,0,0" Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" VerticalAlignment="Top" Width="5.5"/>
                <Path Data="M32.25,10.125 L36.5,10.25" Fill="#33F4F4F5" HorizontalAlignment="Left" Height="2.125" Margin="31.083,10.125,0,0" Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" VerticalAlignment="Top" Width="6.25"/>
                <Path Data="M30.75,16.5 L34,18.25" Fill="#33F4F4F5" HorizontalAlignment="Left" Margin="29.916,15.832,0,15.418" Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" Width="5.25"/>
                <Path Data="M-52,48" HorizontalAlignment="Left" Height="0" Margin="-52,0,0,-13" Stretch="Fill" Stroke="White" UseLayoutRounding="False" VerticalAlignment="Bottom" Width="0"/>
            </Grid>
                <TextBlock Text="{Binding ToastLabel}" Foreground="White" FontWeight="Bold" VerticalAlignment="Center"/>
                <TextBlock Text="{Binding ToastText}" Foreground="White" VerticalAlignment="Center"/>
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>